<?php
namespace app\admin\controller;
use \think\facade\View;
use \think\facade\Request;
use \think\facade\Db;

class Goods{

    public function brand()
    {

        $post=Request::param();
        //批量赋值 可以按键输出 进行留置
        view::assign($post);
        //拼装搜索条件
        $where=[];
        if(isset($post['keywords'])&& $post['keywords']<> '')     $where['keywords']=$post['keywords'];
        if(isset($post['if_show']) && count($post['if_show'])==1) $where['if_show']=$post['if_show'];
        if(isset($post['recommended']) && $post['recommended'] <> '')     $where['recommended']=$post['recommended'];

        $brand=\app\admin\model\brand::getBrand($where);
        View::assign('brand',$brand);
        return view();
    }
}